#!/bin/bash
etl_date=$(date -d "yesterday" +%Y-%m-%d)
nohup hive -hivevar etl_date="$etl_date" -f /opt/tmp/inc_add_whq.sql & > /hive_ods_dwd/inc_add.log
nohup hive -hivevar etl_date="$etl_date" -f /opt/tmp/full_add_whq.sql & > /hive_ods_dwd/full_add.log
nohup hive -hivevar etl_date="$etl_date" -f /opt/tmp/full_over_whq.sql & > /hive_ods_dwd/full_over.log
if test $? -ne 0
then
	# 运行失败则退出
	echo "ODS-DWD 增量报错"
	exit
fi